﻿using System;
using System.Reflection;

namespace DictToObject.Helpers
{
    public class FieldMember : IFieldLikeMember
    {
        private readonly FieldInfo fieldInfo;

        public FieldMember(FieldInfo fieldInfo)
        {
            this.fieldInfo = fieldInfo;
        }

        public Type Type
        {
            get { return fieldInfo.FieldType; }
        }

        public void SetValue(object instance, object value)
        {
            fieldInfo.SetValue(instance, value);
        }
    }
}